﻿<?php
/**
*   school manager
*
*/
include_once('../../Model/Message.php');
include_once('../../DB/DBHelper.php');

$page = isset($_GET['page']) ? (is_numeric($_GET[page])?$_GET['page'] : 1 ): 1;

$helper = DBHelper::getInstance();

$page = ($page - 1) * PAGE_SIZE;

$sql = "select * from `s_school` limit  {$page} , ".PAGE_SIZE;
$result = $helper -> getRows($sql);
?>
<html>
<head>
<link rel="stylesheet" href="./Static/css/school_main.css" />
<link rel="stylesheet" href="./Static/css/table.css" />
</head>
<body>
<div class="school_frame">
<table class="bordered">
        <thead>
        <tr>
                <th align="center">No</th>        
                <th align="center">ID</th>
                <th >学校名称</th>
	  <th align="center" width="100">操作</th>
        </tr>
        </thead>
             <?php
            if($result){
                foreach ($result as $key => $value) {
            ?>
            <tr>
                <td><?php echo $key;?></td>
                <td><?php echo $value['id']?></td>
                <td align="center"><?php echo $value['full_name']?></td>
                <td  align="center" class="news_operation_delete" ><a href="#">Delete</a></td>
            </tr>
            <?php }}?>
    </table>
</div>
</body>
<script type="text/javascript" >
$(document).ready(function(){
	
});
</script>
</html>